package com.egov.business.system.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.egov.business.system.entity.SysPermission;
import com.egov.business.system.mapper.SysPermissionMapper;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 菜单权限表 服务实现类
 * </p>
 */
@Service
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> {
    @Resource
    private SysPermissionMapper sysPermissionMapper;

    @Cacheable(value = "permission")
    public List<String> queryPermissionUrlWithStar() {
        return sysPermissionMapper.queryPermissionUrlWithStar();
    }

    public List<SysPermission> queryByUser(String username) {
        return sysPermissionMapper.queryByUser(username);
    }
}
